package com.xishu.entity.feedback;

import com.xishu.annotation.dao.Search;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.util.List;

@Entity(name = "feed_back")
@Table(indexes = {@Index(columnList = "shopId")})
public class Feedback extends AbstractEntity  {
    @ApiModelProperty(value = "归属的餐厅公司")
    private Long companyId;

    @ApiModelProperty(value = "分店的ID")
    private Long shopId;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("内容")
    @Column(length = 2000)
    private String content;

    @ApiModelProperty("类型,1是商家，2是用户")
    private Integer type;

    @ApiModelProperty("回复")
    @Column(length = 2000)
    private String feedBackContent;

    @ApiModelProperty("反馈的分数,1非常满意，2满意，3一般，4不满意，5非常不满意")
    private Long star;

    @ApiModelProperty("满意度查询")
    @Transient
    @Search(in = true, fieldName = "star")
    private List<Long> startList;

    @ApiModelProperty("状态,1是未答复，2是已答复，3是已解决")
    private Integer status;

    @ApiModelProperty("回复的反馈的ID,第一次反馈的时候为空")
    private Long parentId;

    @ApiModelProperty("处理人")
    private String dealPerson;

    @ApiModelProperty("是否是平台回复")
    private Boolean platformFeedback;

    @ApiModelProperty("订单ID")
    private Long orderId;

    @ApiModelProperty("用户姓名")
    private String userName;

    @Transient
    @ApiModelProperty(value = "场景归属的分店")
    private String shopName_zh;

    @Transient
    @ApiModelProperty(value = "场景归属的分店")
    private String shopName_en;

    @Transient
    @ApiModelProperty(value = "公司名称")
    private String companyName;

    public String getShopName_zh() {
        return shopName_zh;
    }

    public void setShopName_zh(String shopName_zh) {
        this.shopName_zh = shopName_zh;
    }

    public String getShopName_en() {
        return shopName_en;
    }

    public void setShopName_en(String shopName_en) {
        this.shopName_en = shopName_en;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public List<Long> getStartList() {
        return startList;
    }

    public void setStartList(List<Long> startList) {
        this.startList = startList;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Boolean getPlatformFeedback() {
        return platformFeedback;
    }

    public void setPlatformFeedback(Boolean platformFeedback) {
        this.platformFeedback = platformFeedback;
    }

    public String getDealPerson() {
        return dealPerson;
    }

    public void setDealPerson(String dealPerson) {
        this.dealPerson = dealPerson;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getStar() {
        return star;
    }

    public void setStar(Long star) {
        this.star = star;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getFeedBackContent() {
        return feedBackContent;
    }

    public void setFeedBackContent(String feedBackContent) {
        this.feedBackContent = feedBackContent;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Feedback{");
        sb.append("companyId=").append(companyId);
        sb.append(", shopId=").append(shopId);
        sb.append(", title='").append(title).append('\'');
        sb.append(", content='").append(content).append('\'');
        sb.append(", type=").append(type);
        sb.append(", feedBackContent='").append(feedBackContent).append('\'');
        sb.append(", star=").append(star);
        sb.append(", status=").append(status);
        sb.append(", parentId=").append(parentId);
        sb.append(", dealPerson='").append(dealPerson).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
